package com.vcredit.creditcat.service.loginPreview;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by liaoshengjun on 2017/10/27.
 */
@Service
public class ProductPreviewFactory {
	@Autowired
	private Map<String,IProductPreview> productPreviewMap;

	public IProductPreview getProductPreviewInterface(String className) {
		return productPreviewMap.get(className);
	}

	public boolean exitClass(String className) {
		if (!productPreviewMap.containsKey(className)){
			return false;
		}
		return true;
	}
}
